-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[

]]--
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local assets =
{
    Asset("ANIM", "anim/loramia_building_mysterious_creation.zip"),
    Asset("ANIM", "anim/loramia_building_mysterious_creation_line.zip"),
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---
    local MYSTERIOUS_CREATION_COST_PERCENT =  TUNING["loramia.Config"].MYSTERIOUS_CREATION_COST_PERCENT or 0.01
    local MYSTERIOUS_CREATION_HUNGER_VALUE_UP = TUNING["loramia.Config"].MYSTERIOUS_CREATION_HUNGER_VALUE_UP or 50
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 
    local Widget = require "widgets/widget"
    local Image = require "widgets/image" -- 引入image控件
    local UIAnim = require "widgets/uianim"
    local Screen = require "widgets/screen"
    local AnimButton = require "widgets/animbutton"
    local ImageButton = require "widgets/imagebutton"
    local Menu = require "widgets/menu"
    local Text = require "widgets/text"
    local TEMPLATES = require "widgets/redux/templates"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 积雪
    local function snow_init(inst)
        if TheWorld.state.issnowcovered then
            -- inst.AnimState:Show("SNOW")
            inst.AnimState:ShowSymbol("snow")
        else
            -- inst.AnimState:Hide("SNOW")
            inst.AnimState:HideSymbol("snow")
        end    
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- workable
    local function OnFinishCallback(inst,worker)
        if not (worker and worker:HasTag("player")) then
            return
        end
        local fx = SpawnPrefab("collapse_big")
        fx.Transform:SetPosition(inst.Transform:GetWorldPosition())
        inst:AddComponent("lootdropper")
        inst.components.lootdropper:SpawnLootPrefab("redgem")
        inst.components.lootdropper:SpawnLootPrefab("yellowgem")
        inst:Remove()
    end
    local function OnWorkCallback(inst,worker)
        if worker and worker:HasTag("player") then
            ---
        else
            inst.components.workable:SetWorkLeft(1)
        end
    end
    local function offical_workable_install(inst)
        inst:AddComponent("workable")
        inst.components.workable:SetWorkAction(ACTIONS.DIG)
        inst.components.workable:SetWorkLeft(1)
        inst.components.workable:SetOnWorkCallback(OnWorkCallback)
        inst.components.workable:SetOnFinishCallback(OnFinishCallback)
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 天赋
    local function IsPlayerTalentUnlocked(doer)
        if doer and doer.replica.loramia_com_talent_tree and doer.replica.loramia_com_talent_tree:IsUnlocked("evolutionary_mystery") then
            return true
        end
        return false
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 帐篷组件
    local function Tent_Enter_Test_Fn(inst,doer)
        if doer.IsNearDanger and doer:IsNearDanger() then
            return false
        end
        if doer:HasTag("loramia") then
            return true
        elseif doer.components.hunger and doer.components.hunger.current >= TUNING.CALORIES_MED then
            return true
        end
        return false
    end
    local function OnLeaveFn(inst,doer)
        print("玩家离开帐篷",doer)
        if inst.tent_task[doer] ~= nil then
            inst.tent_task[doer]:Cancel()
        end
        inst.tent_task[doer] = nil
        inst:PushEvent("player_leave_tent")
    end
    local function OnEnterFn(inst,doer)
        print("玩家进入帐篷",doer)
        if inst.tent_task[doer] ~= nil then
            inst.tent_task[doer]:Cancel()
        end
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        --- 
            inst.tent_task[doer] = inst:DoPeriodicTask(TUNING.SLEEP_TICK_PERIOD,function()
                local goodsleeperequipped = doer.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD) and doer.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD):HasTag("good_sleep_aid")

                local hunger_tick = TUNING.SLEEP_HUNGER_PER_TICK * (doer.components.sleepingbaguser and doer.components.sleepingbaguser.hunger_bonus_mult or 1)
                local health_tick = TUNING.SLEEP_HEALTH_PER_TICK * (doer.components.sleepingbaguser and doer.components.sleepingbaguser.health_bonus_mult or 1)
                local sanity_tick = TUNING.SLEEP_SANITY_PER_TICK * (doer.components.sleepingbaguser and doer.components.sleepingbaguser.sanity_bonus_mult or 1) * (goodsleeperequipped and TUNING.GOODSLEEP_SANITY or 1)
                
                local isstarving = false
                local starving_leave_block = false
                if doer.components.hunger ~= nil then
                    ----------------------------------------------------------------------
                    --- 专属代码
                        if doer:HasTag("loramia") then
                            local max_battery_value = inst.components.loramia_com_power_device:GetMaxCanTakePower()
                            local battery_cost = MYSTERIOUS_CREATION_HUNGER_VALUE_UP or 50
                            local hunger_delta_value = math.min(max_battery_value,battery_cost) -- 榨干发电机所有电量，最多50
                            battery_cost = hunger_delta_value
                            if IsPlayerTalentUnlocked(doer) then -- 天赋加成,消耗减半
                                battery_cost = battery_cost/2
                            end
                            ----------------------------------------------------
                            --- 动画处理
                                if inst.components.loramia_com_power_device:CanTakePower(battery_cost) then
                                    if not inst:HasTag("working_fx_activing") then
                                        inst:PushEvent("working_fx_start")
                                    end
                                else
                                    inst:PushEvent("working_fx_stop")
                                end
                                inst:PushEvent("working_fx_loramia",true)
                            ----------------------------------------------------
                            if hunger_delta_value > 0
                                and doer.components.hunger:GetPercent() < 1
                                and inst.components.loramia_com_power_device:CanTakePower(battery_cost) 
                                and inst.components.loramia_com_power_device:IsGotPowerSucceed(battery_cost) then
                                    hunger_tick = hunger_delta_value 
                                    --- 清除血量惩罚
                                    if doer.components.health.penalty > 0 then
                                        doer.components.health.penalty = math.clamp(doer.components.health.penalty - 0.05 , 0 , 1 )
                                    end
                            else
                                hunger_tick = 0
                            end
                            starving_leave_block = true
                        end
                    ----------------------------------------------------------------------
                    doer.components.hunger:DoDelta(hunger_tick, true, true)
                    isstarving = doer.components.hunger:IsStarving()
                end

                if doer.components.sanity ~= nil and doer.components.sanity:GetPercentWithPenalty() < 1 then
                    doer.components.sanity:DoDelta(sanity_tick, true)
                end

                if not isstarving and doer.components.health ~= nil then
                    doer.components.health:DoDelta(health_tick, true, inst.prefab, true)
                end

                if doer.components.temperature ~= nil then
                    if doer.components.temperature:GetCurrent() > TUNING.SLEEP_TARGET_TEMP_TENT then
                        doer.components.temperature:SetTemperature(doer.components.temperature:GetCurrent() - TUNING.SLEEP_TEMP_PER_TICK)
                    else
                        doer.components.temperature:SetTemperature(doer.components.temperature:GetCurrent() + TUNING.SLEEP_TEMP_PER_TICK)
                    end
                end

                if isstarving and not starving_leave_block then
                    -- OnLeaveFn(inst,doer)
                    inst.components.loramia_com_tent:PlayerLeave(doer)
                end
            end)
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        inst:PushEvent("player_enter_tent")
    end
    local function Custom_On_ActivceKeyBoardEvent(inst,doer)
        -----------------------------------------------------------------
        --- 前置准备
            local front_root = doer and doer.HUD
            if front_root == nil then
                return
            end
            if inst.wakeup_widget then
                inst.wakeup_widget:Kill()
            end
        -----------------------------------------------------------------
        --- 
            if doer.__test_fn then
                inst.wakeup_widget = doer.__test_fn(inst,front_root)
                return
            end
        -----------------------------------------------------------------
        --
            local root = front_root:AddChild(Widget())
            root:SetHAnchor(1) -- 设置原点x坐标位置，0、1、2分别对应屏幕中、左、右
            root:SetVAnchor(2) -- 设置原点y坐标位置，0、1、2分别对应屏幕中、上、下
            root:SetPosition(1000,500)
            root:SetScaleMode(SCALEMODE_FIXEDSCREEN_NONDYNAMIC)   --- 缩放模式
        -----------------------------------------------------------------
        ---
            -- local leave_button = root:AddChild(ImageButton("images/global_redux.xml",
            --     "button_carny_xlong_hover.tex",
            --     "button_carny_xlong_hover.tex",
            --     "button_carny_xlong_hover.tex",
            --     "button_carny_xlong_hover.tex",
            --     "button_carny_xlong_hover.tex"
            -- ))
            -- leave_button:SetOnClick(function()
            --     inst.replica.loramia_com_tent:PlayerCommandWakeUp(ThePlayer)
            -- end)
            -- local scale = 0.5
            -- leave_button:SetScale(scale,scale,scale)
        -----------------------------------------------------------------
        --- 镜头跟随
            local temp_fx = SpawnPrefab("loramia_building_mysterious_creation_fx")
            temp_fx.entity:AddFollower()
            temp_fx.entity:SetParent(inst.entity)
            temp_fx.Follower:FollowSymbol(inst.GUID, "inside",0,0,0,true)
            TheCamera:SetTarget(temp_fx)
            root.inst:ListenForEvent("onremove",function()
                temp_fx:Remove()
                TheCamera:SetTarget(TheFocalPoint) -- 镜头还原,不能设置ThePlayer
            end)
        -----------------------------------------------------------------
        --- key handler            
            root.inst:DoPeriodicTask(FRAMES,function()
                if TheInput:IsControlPressed(CONTROL_MOVE_LEFT) 
                    or TheInput:IsControlPressed(CONTROL_MOVE_RIGHT) 
                    or TheInput:IsControlPressed(CONTROL_MOVE_UP) 
                    or TheInput:IsControlPressed(CONTROL_MOVE_DOWN) then
                        inst.replica.loramia_com_tent:PlayerCommandWakeUp(ThePlayer)
                end
            end)            
        -----------------------------------------------------------------
        ---
            local s_pt_x,s_pt_y= TheSim:GetScreenPos(inst.Transform:GetWorldPosition()) -- 左下角为原点。
            local offset_x,offset_y = 0,100
            root:SetPosition(s_pt_x + offset_x,s_pt_y + offset_y)
        -----------------------------------------------------------------
        ---
            inst.wakeup_widget = root
        -----------------------------------------------------------------
    end
    local function Custom_On_DeactiveKeyBoardEvent(inst,doer)
        if inst.wakeup_widget then
            inst.wakeup_widget:Kill()
        end
        inst.wakeup_widget = nil
    end
    local function install_tent_com(inst)
        inst:ListenForEvent("Loramia_OnEntityReplicated.loramia_com_tent",function(inst,replica_com)
            replica_com:SetTestFn(function(inst,doer)
                return true
            end)
            replica_com:SetCustomOnActiveKeyBoardEvent(Custom_On_ActivceKeyBoardEvent)
            replica_com:SetCustomOnDeactiveKeyBoardEvent(Custom_On_DeactiveKeyBoardEvent)
        end)
        if not TheWorld.ismastersim then
            return
        end
        inst.tent_task = {}
        inst:AddComponent("loramia_com_tent")
        inst.components.loramia_com_tent:SetEnterTestFn(Tent_Enter_Test_Fn)
        inst.components.loramia_com_tent:SetOnEnterFn(OnEnterFn)
        inst.components.loramia_com_tent:SetOnLeaveFn(OnLeaveFn)
        inst.components.loramia_com_tent:SetCustomKeyboardEvent(true)
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 打包
    local function custom_workable_install(inst)
        inst:ListenForEvent("Loramia_OnEntityReplicated.loramia_com_workable",function(inst,replica_com)
            replica_com:SetTestFn(function(inst,doer,right_click)
                if right_click and (IsPlayerTalentUnlocked(doer) or TUNING.LORAMIA_DEBUGGING_MODE) then
                    return true
                end
            end)
            replica_com:SetText("loramia_building_mysterious_creation",STRINGS.ACTIONS.WRAPBUNDLE)
        end)
        if not TheWorld.ismastersim then
            return
        end
        inst:AddComponent("loramia_com_workable")
        inst.components.loramia_com_workable:SetActiveFn(function(inst,doer)
            -- inst.components.loramia_com_tent:AllPlayerLeave()
            local item = SpawnPrefab("loramia_building_mysterious_creation_kit")
            item.Transform:SetPosition(inst.Transform:GetWorldPosition())
            inst:Remove()
            return true
        end)
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- working fx event 动画特效
    local function fn__inside_fx(inst)
        local __inside_fx = SpawnPrefab("loramia_building_mysterious_creation_fx")
        __inside_fx.entity:SetParent(inst.entity)
        __inside_fx.entity:AddFollower()
        __inside_fx.Follower:FollowSymbol(inst.GUID, "inside",0,0,0,true)
        __inside_fx.AnimState:PlayAnimation("inside",true)
        inst.__inside_fx = __inside_fx
        __inside_fx:Hide()
    end
    local function fn__loramia_fx(inst)
        local __loramia_fx = SpawnPrefab("loramia_building_mysterious_creation_fx")
        inst.__loramia_fx = __loramia_fx
        __loramia_fx.AnimState:SetBank("loramia_building_mysterious_creation_line")
        __loramia_fx.AnimState:SetBuild("loramia_building_mysterious_creation_line")
        __loramia_fx.AnimState:PlayAnimation("loramia")
        __loramia_fx.entity:AddFollower()
        __loramia_fx.entity:SetParent(inst.entity)
        __loramia_fx.Follower:FollowSymbol(inst.GUID, "inside",0,0,0,true)
        __loramia_fx:Hide()
    end
    local function fn__ring_fx(inst)
        local __ring_fx = SpawnPrefab("loramia_building_mysterious_creation_fx")
        __ring_fx.AnimState:SetBank("loramia_building_mysterious_creation_line")
        __ring_fx.AnimState:SetBuild("loramia_building_mysterious_creation_line")
        __ring_fx.AnimState:PlayAnimation("fx",true)
        __ring_fx.entity:AddFollower()
        __ring_fx.entity:SetParent(inst.entity)
        __ring_fx.Follower:FollowSymbol(inst.GUID, "inside",0,0,0,true)
        inst.__ring_fx = __ring_fx
        __ring_fx:Hide()
    end
    local function fn_line_fx(inst)
        local __line_fx = SpawnPrefab("loramia_building_mysterious_creation_fx")
        __line_fx.AnimState:SetBank("loramia_building_mysterious_creation_line")
        __line_fx.AnimState:SetBuild("loramia_building_mysterious_creation_line")
        __line_fx.AnimState:PlayAnimation("idle",true)
        __line_fx.entity:AddFollower()
        __line_fx.entity:SetParent(inst.entity)
        __line_fx.Follower:FollowSymbol(inst.GUID, "inside",72,-8,0,true)
        inst.__line_fx = __line_fx
        __line_fx:Hide()
    end
    local function working_fx_event_install(inst)        
        inst:ListenForEvent("working_fx_init",function(inst)
            inst:DoTaskInTime(0.1 + 0.1 * 0,fn__inside_fx)
            inst:DoTaskInTime(0.1 + 0.1 * 1,fn__loramia_fx)
            inst:DoTaskInTime(0.1 + 0.1 * 2,fn__ring_fx)
            inst:DoTaskInTime(0.1 + 0.1 * 3,fn_line_fx)
        end)
        inst:ListenForEvent("working_fx_start",function(inst,loramia_show)
            inst:PushEvent("working_fx_stop")
            ----------------------------------------------------
            --- 内部圈圈
                inst:AddTag("working_fx_activing")
                inst.AnimState:OverrideSymbol("inside","loramia_building_mysterious_creation","inside_empty")
                if inst.__inside_fx then
                    inst.__inside_fx:Show()
                end
                if inst.__loramia_fx then
                    inst.__loramia_fx:Show()
                end
                if loramia_show then
                    inst.__loramia_fx:Show()
                else
                    inst.__loramia_fx:Hide()
                end
                if inst.__ring_fx then
                    inst.__ring_fx:Show()
                end

                if inst.__line_fx then
                    inst.__line_fx:Show()
                end
                --- 主体动画
                inst.AnimState:Resume()
                inst.AnimState:PlayAnimation("idle",true)
                inst.AnimState:ShowSymbol("fx")
            ----------------------------------------------------
        end)
        inst:ListenForEvent("working_fx_stop",function(inst)
            ----------------------------------------------------
            ---
                inst:RemoveTag("working_fx_activing")
            ----------------------------------------------------
            --- 圈圈
                inst.AnimState:PlayAnimation("idle")
                if inst.__inside_fx then
                    inst.__inside_fx:Hide()
                end
                if inst.__loramia_fx then
                    inst.__loramia_fx:Hide()
                end
                if inst.__ring_fx then
                    inst.__ring_fx:Hide()
                end
                if inst.__line_fx then
                    inst.__line_fx:Hide()
                end
                inst.AnimState:ClearOverrideSymbol("inside")
                inst.AnimState:HideSymbol("fx")
                inst.AnimState:Pause()
            ----------------------------------------------------
        end)

        inst:ListenForEvent("working_fx_loramia",function(inst,show)
            if inst:HasTag("working_fx_activing") then
                if show then
                    inst:PushEvent("working_fx_start",true)
                else
                    inst:PushEvent("working_fx_start",false)
                end
            else
                inst:PushEvent("working_fx_start")
                inst:PushEvent("working_fx_stop")
                if show then
                    inst.__loramia_fx:Show()
                else
                    inst.__loramia_fx:Hide()
                end
            end
        end)
        inst:DoTaskInTime(0,function()
            inst:PushEvent("working_fx_init")
        end)
    end
    local function anim_controller_install(inst)
        inst:ListenForEvent("player_enter_tent",function(inst)
            if inst:HasTag("working_fx_activing") then
                
            else
                -- inst:PushEvent("working_fx_start")
            end
            --- 检查有没有loramia
            if inst.components.loramia_com_tent:HasPlayerPrefab("loramia") then
                inst:PushEvent("working_fx_loramia",true)
            end
        end)
        inst:ListenForEvent("player_leave_tent",function(inst)
            local sleepers,num = inst.components.loramia_com_tent:GetAllPlayers()
            if num == 0 then
                inst:PushEvent("working_fx_stop")
            end
            --- 检查有没有loramia
            if inst.components.loramia_com_tent:HasPlayerPrefab("loramia") then
                inst:PushEvent("working_fx_loramia",true)
            else
                inst:PushEvent("working_fx_loramia",false)
            end
        end)
    end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- building

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddLight()
    inst.entity:AddSoundEmitter()
    inst.entity:AddMiniMapEntity()
    inst.entity:AddNetwork()

    MakeObstaclePhysics(inst, 1)


    inst.MiniMapEntity:SetIcon("loramia_building_mysterious_creation.tex")

    inst.AnimState:SetBank("loramia_building_mysterious_creation")
    inst.AnimState:SetBuild("loramia_building_mysterious_creation")
    inst.AnimState:OverrideSymbol("fx","loramia_building_mysterious_creation_line","fx2") -- 拆分了两个包
    inst.AnimState:PlayAnimation("idle")
    inst.AnimState:HideSymbol("fx")
    inst.AnimState:Pause()


    inst:AddTag("structure")
    inst:AddTag("loramia_building_mysterious_creation")

    inst.entity:SetPristine()
    -----------------------------------------------------------
    ---     
        install_tent_com(inst)
        custom_workable_install(inst)
    -----------------------------------------------------------
    ---

    -----------------------------------------------------------

    if not TheWorld.ismastersim then
        return inst
    end
    -----------------------------------------------------------
    --- 
    -----------------------------------------------------------
    --- 
        inst:AddComponent("inspectable")
    -----------------------------------------------------------
    --- 
        -- inst:AddComponent("lootdropper")
    -----------------------------------------------------------
    --- 
        inst:AddComponent("loramia_com_power_device")    
    -----------------------------------------------------------
    --- 
        offical_workable_install(inst)
        working_fx_event_install(inst)
        anim_controller_install(inst)
    -----------------------------------------------------------
    --- 
    -----------------------------------------------------------
    -----------------------------------------------------------

    MakeHauntableLaunch(inst)

    return inst
end

----------------------------------------------------------------------------------------------------------------------
--- item
    local function item_fn()
        local inst = CreateEntity()
        inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddSoundEmitter()
        inst.entity:AddMiniMapEntity()
        inst.entity:AddNetwork()
        MakeInventoryPhysics(inst)
        MakeInventoryFloatable(inst, "med", 0.05, {0.85, 0.45, 0.85})
        inst.AnimState:SetBank("loramia_building_mysterious_creation")
        inst.AnimState:SetBuild("loramia_building_mysterious_creation")
        inst.AnimState:PlayAnimation("item")
        inst:AddTag("deploykititem")
        inst.entity:SetPristine()
        if not TheWorld.ismastersim then
            return inst
        end
        --------------------------------------------------------------------------
        ---
            inst:AddComponent("loramia_data")
        --------------------------------------------------------------------------
        ------ 物品名 和检查文本
            inst:AddComponent("inspectable")
            inst:AddComponent("inventoryitem")
            -- inst.components.inventoryitem:ChangeImageName("cane")
            inst.components.inventoryitem.imagename = "loramia_building_mysterious_creation_kit"
            inst.components.inventoryitem.atlasname = "images/inventoryimages/loramia_building_mysterious_creation_kit.xml"
        -------------------------------------------------------------------
            MakeHauntableLaunch(inst)
        -------------------------------------------------------------------
        --- 落水影子
            local function shadow_init(inst)
                if inst:IsOnOcean(false) then       --- 如果在海里（不包括船）
                    -- inst.AnimState:Hide("SHADOW")
                    inst.AnimState:HideSymbol("shadow")
                else                                
                    -- inst.AnimState:Show("SHADOW")
                    inst.AnimState:ShowSymbol("shadow")
                end
            end
            inst:ListenForEvent("on_landed",shadow_init)
            shadow_init(inst)
        -------------------------------------------------------------------
        --- 积雪
            inst:WatchWorldState("issnowcovered", snow_init)
            snow_init(inst)
        -------------------------------------------------------------------
        --- 放置
            inst:AddComponent("deployable")
            inst.components.deployable.ondeploy = function(inst,pt,player)
                local ret_inst = SpawnPrefab("loramia_building_mysterious_creation")
                ret_inst.Transform:SetPosition(pt.x,0,pt.z)
                inst:Remove()
            end
            inst.components.deployable:SetDeploySpacing(DEPLOYSPACING.NONE)
            inst.components.deployable.restrictedtag = "loramia"
        -------------------------------------------------------------------
        --- 特效
        -------------------------------------------------------------------
        return inst
    end
----------------------------------------------------------------------------------------------------------------------
--- fx
    local function fx_fn()
        local inst = CreateEntity()
        inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddNetwork()
        inst.AnimState:SetBank("loramia_building_mysterious_creation")
        inst.AnimState:SetBuild("loramia_building_mysterious_creation")
        inst:AddTag("fx")
        inst.entity:SetPristine()
        if not TheWorld.ismastersim then
            return inst
        end
        return inst
    end
----------------------------------------------------------------------------------------------------------------------
--- placer
    local function placer_postinit_fn(inst)
        TheWorld:PushEvent("loramia_com_power_battery_indicator_active",inst)
    end
----------------------------------------------------------------------------------------------------------------------

return Prefab("loramia_building_mysterious_creation", fn, assets),
    Prefab("loramia_building_mysterious_creation_fx", fx_fn, assets),
    Prefab("loramia_building_mysterious_creation_kit", item_fn, assets),
    MakePlacer("loramia_building_mysterious_creation_kit_placer", "loramia_building_mysterious_creation", "loramia_building_mysterious_creation", "idle", nil, nil, nil, nil, nil, nil, placer_postinit_fn)


